package com.openvas.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.openvas.commons.common.annotation.Excel;
import com.openvas.commons.common.core.domain.BaseEntity;

/**
 * 漏洞对象 table_vulnerabilities
 * 
 * @author ruoyi
 * @date 2021-11-04
 */
public class TableVulnerabilities extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 漏洞名称 */
    @Excel(name = "漏洞名称")
    private String name;

    /** 漏洞类型 */
    @Excel(name = "漏洞类型")
    private String type;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date creationTime;

    /** 修改时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "修改时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date modificationTime;

    /** 脆弱性的严重程度 */
    @Excel(name = "脆弱性的严重程度")
    private Long severity;

    /** 漏洞的检测质量 （QoD） */
    @Excel(name = "漏洞的检测质量 ", readConverterExp = "Q=oD")
    private Integer qod;

    /** 漏洞的结果数 */
    @Excel(name = "漏洞的结果数")
    private Integer resultCount;

    /** 结果最古老的时间戳 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结果最古老的时间戳", width = 30, dateFormat = "yyyy-MM-dd")
    private Date oldest;

    /** 结果最新的时间戳 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结果最新的时间戳", width = 30, dateFormat = "yyyy-MM-dd")
    private Date newest;

    /** 检测到漏洞的主机数量 */
    @Excel(name = "检测到漏洞的主机数量")
    private Integer hostCount;

    /** 用户名称 */
    @Excel(name = "用户名称")
    private String userName;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setCreationTime(Date creationTime) 
    {
        this.creationTime = creationTime;
    }

    public Date getCreationTime() 
    {
        return creationTime;
    }
    public void setModificationTime(Date modificationTime) 
    {
        this.modificationTime = modificationTime;
    }

    public Date getModificationTime() 
    {
        return modificationTime;
    }
    public void setSeverity(Long severity) 
    {
        this.severity = severity;
    }

    public Long getSeverity() 
    {
        return severity;
    }
    public void setQod(Integer qod) 
    {
        this.qod = qod;
    }

    public Integer getQod() 
    {
        return qod;
    }
    public void setResultCount(Integer resultCount) 
    {
        this.resultCount = resultCount;
    }

    public Integer getResultCount() 
    {
        return resultCount;
    }
    public void setOldest(Date oldest) 
    {
        this.oldest = oldest;
    }

    public Date getOldest() 
    {
        return oldest;
    }
    public void setNewest(Date newest) 
    {
        this.newest = newest;
    }

    public Date getNewest() 
    {
        return newest;
    }
    public void setHostCount(Integer hostCount) 
    {
        this.hostCount = hostCount;
    }

    public Integer getHostCount() 
    {
        return hostCount;
    }
    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("type", getType())
            .append("creationTime", getCreationTime())
            .append("modificationTime", getModificationTime())
            .append("severity", getSeverity())
            .append("qod", getQod())
            .append("resultCount", getResultCount())
            .append("oldest", getOldest())
            .append("newest", getNewest())
            .append("hostCount", getHostCount())
            .append("userName", getUserName())
            .toString();
    }
}
